package uztest;

import java.util.Calendar;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import atempdao.EgnMarketVariDao;


import dao.*;

public class TestMarketVariableHis {
	private final static Logger logger = 
		LoggerFactory.getLogger(TestMarketVariableHis.class);	

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		aaa();
		bbb();
		ccc();
		ddd();
		eee();
	}
	
	private static void aaa(){
		Calendar cal =EgnMarketVariDao.getEgnMarketVairHisLastDate();
		logger.debug("Last Date in His:{}", cal);
	}
	private static void bbb(){
		Calendar cal =EgnMarketVariDao.getEgnMarketVairHisLastDate();
		
		for(EgnMarketVariHis mvHis: EgnMarketVariDao.getEgnMarketVariHis(cal, 100)){
			logger.debug("Last Date in His1:{},{}", mvHis.getId().getMvId(),mvHis.getId().getMaturityId());
		}
	}

	private static void ccc(){
		Calendar cal =EgnMarketVariDao.getEgnMarketVairHisLastDate();
		for(EgnMarketVariHis mvHis: EgnMarketVariDao.getEgnMarketVariHis(cal)){
			logger.debug("Last Date in His2:{},{}", mvHis.getId().getMvId(),mvHis.getId().getMaturityId());
		}
	}

	private static void ddd(){
		String mvId ="IRKRW_AAA";
		for(EgnMarketVariHis mvHis: EgnMarketVariDao.getEgnMarketVariHis(mvId)){
			logger.debug("Last Date in His3:{},{}", mvHis.getId().getMvId(),mvHis.getId().getMaturityId());
		}
	}
	private static void eee(){
		String mvId ="IRKRW_AAA";
		Calendar cal =EgnMarketVariDao.getEgnMarketVairHisLastDate(mvId);
		for(EgnMarketVariHis mvHis: EgnMarketVariDao.getEgnMarketVariHis(mvId,cal)){
			logger.debug("Last Date in His5:{},{}", mvHis.getId().getMvId(),mvHis.getId().getMaturityId());
		}
	}
}
